

import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-11-21
 * Time:17:21
 */
public class TestDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str1 = sc.nextLine();
        String str2 = sc.nextLine();
        StringBuffer str3 = new StringBuffer();
        for (int i = 0; i < str1.length(); i++) {

            char letter = str1.charAt(i);
            //使用加法连接空字符串
            if(!str2.contains(letter+"")){

               str3.append(letter);

            }
        }
        System.out.println(str3.toString());

    }
}
